cmake_minimum_required(VERSION 3.5)

project(TestRpath CXX)

set(CMAKE_VERBOSE_MAKEFILE ON)
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)

add_library(aaa SHARED a.cc)
add_library(bbb SHARED b.cc)
target_link_libraries(bbb aaa)
set_target_properties(bbb PROPERTIES SKIP_BUILD_RPATH TRUE)

add_executable(${PROJECT_NAME} main.cc)
target_link_libraries(${PROJECT_NAME} bbb)

